﻿<?xml version="1.0" encoding="utf-8"?>
<xsd:schema id="RestrictPropertiesExampleSchema" targetNamespace="http://schemas.microsoft.com/dsltools/RestrictPropertiesExample" elementFormDefault="qualified" xmlns="http://schemas.microsoft.com/dsltools/RestrictPropertiesExample" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <!-- ExampleModel -->
  <xsd:element name="exampleModel" type="ExampleModel" />
  <xsd:complexType name="ExampleModel">
    <xsd:annotation>
      <xsd:documentation>The root in which all other elements are embedded. Appears as a diagram.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence minOccurs="0" maxOccurs="1">
      <!-- Relationship: ExampleModelHasElements -->
      <xsd:element name="elements" minOccurs="0" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>Instances of ExampleModelHasElements</xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
          <xsd:sequence>
            <xsd:choice minOccurs="0" maxOccurs="unbounded" >
              <xsd:element ref="exampleModelHasElements">
                <xsd:annotation>
                  <xsd:documentation>[Relationship deriving from ExampleModelHasElements needs to be serialized in full-form]</xsd:documentation>
                </xsd:annotation>
              </xsd:element>
              <xsd:element ref="exampleElement" >
                <xsd:annotation>
                  <xsd:documentation>[Target role-player]</xsd:documentation>
                </xsd:annotation>
              </xsd:element>
            </xsd:choice>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:sequence>
    <!-- Id -->
    <xsd:attribute name="Id" type="xsd:string">
      <xsd:annotation>
        <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <!-- dslVersion -->
    <xsd:attribute name="dslVersion" type="xsd:string">
      <xsd:annotation>
        <xsd:documentation>Version of the model serialized in this file.</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <!-- Property: P1 -->
    <xsd:attribute name="p1" type="xsd:string" />
    <!-- Property: P2 -->
    <xsd:attribute name="p2" type="xsd:string" />
    <!-- Property: P3 -->
    <xsd:attribute name="p3" type="xsd:string" />
  </xsd:complexType>
  
  <!-- ExampleModel Moniker -->
  <xsd:element name="exampleModelMoniker" type="ExampleModelMoniker" />
  <xsd:complexType name="ExampleModelMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for ExampleModel instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="Id" type="xsd:string" >
      <xsd:annotation>
        <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
  </xsd:complexType>
  
  <!-- ExampleElement -->
  <xsd:element name="exampleElement" type="ExampleElement" />
  <xsd:complexType name="ExampleElement">
    <xsd:annotation>
      <xsd:documentation>Elements embedded in the model. Appear as boxes on the diagram.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence minOccurs="0" maxOccurs="1">
      <!-- Relationship: ExampleElementReferencesTargets -->
      <xsd:element name="targets" minOccurs="0" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>Instances of ExampleElementReferencesTargets</xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element ref="exampleElementReferencesTargets" minOccurs="0" maxOccurs="unbounded">
              <xsd:annotation>
                <xsd:documentation>[Instance of ExampleElementReferencesTargets needs to be serialized in full-form]</xsd:documentation>
              </xsd:annotation>
            </xsd:element>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:sequence>
    <!-- Property: Name -->
    <xsd:attribute name="name" type="xsd:string" use="required" />
    <!-- Property: Pa -->
    <xsd:attribute name="pa" type="xsd:string" />
    <!-- Property: Pb -->
    <xsd:attribute name="pb" type="xsd:string" />
    <!-- Property: Pc -->
    <xsd:attribute name="pc" type="xsd:string" />
    <!-- Property: CustomProperty -->
    <xsd:attribute name="customProperty" type="xsd:string" />
    <!-- Property: CustomPropertyVisible -->
    <xsd:attribute name="customPropertyVisible" type="xsd:boolean" />
    <!-- Property: CustumPropertyReadOnly -->
    <xsd:attribute name="custumPropertyReadOnly" type="xsd:boolean" />
  </xsd:complexType>
  
  <!-- ExampleElement Moniker -->
  <xsd:element name="exampleElementMoniker" type="ExampleElementMoniker" />
  <xsd:complexType name="ExampleElementMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for ExampleElement instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="name" type="xsd:string" >
      <xsd:annotation>
        <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
  </xsd:complexType>
  
  <!-- ExampleModelHasElements -->
  <xsd:element name="exampleModelHasElements" abstract="true" type="ExampleModelHasElements" />
  <xsd:complexType name="ExampleModelHasElements" abstract="true" >
    <xsd:annotation>
      <xsd:documentation>Embedding relationship between the Model and Elements</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence minOccurs="0" maxOccurs="1">
      <!-- Target end ExampleElement -->
      <xsd:element ref="exampleElement" minOccurs="1" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>[Target role-player]</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  
  <!-- ExampleModelHasElements Moniker -->
  <xsd:element name="exampleModelHasElementsMoniker" abstract="true" type="ExampleModelHasElementsMoniker" />
  <xsd:complexType name="ExampleModelHasElementsMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for ExampleModelHasElements instance.</xsd:documentation>
    </xsd:annotation>
  </xsd:complexType>
  
  <!-- ExampleElementReferencesTargets -->
  <xsd:element name="exampleElementReferencesTargets" type="ExampleElementReferencesTargets" />
  <xsd:complexType name="ExampleElementReferencesTargets">
    <xsd:annotation>
      <xsd:documentation>Reference relationship between Elements.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence minOccurs="0" maxOccurs="1">
      <!-- Target end ExampleElement -->
      <xsd:element ref="exampleElementMoniker" minOccurs="1" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>[Target role-player]</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
    <!-- Property: Ra -->
    <xsd:attribute name="ra" type="xsd:string" />
    <!-- Property: Rb -->
    <xsd:attribute name="rb" type="xsd:string" />
    <!-- Property: Rc -->
    <xsd:attribute name="rc" type="xsd:string" />
  </xsd:complexType>
  
  <!-- ExampleElementReferencesTargets Moniker -->
  <xsd:element name="exampleElementReferencesTargetsMoniker" abstract="true" type="ExampleElementReferencesTargetsMoniker" />
  <xsd:complexType name="ExampleElementReferencesTargetsMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for ExampleElementReferencesTargets instance.</xsd:documentation>
    </xsd:annotation>
  </xsd:complexType>
  
</xsd:schema>

